package cn.shutdown.service.impl;

import cn.shutdown.dao.ICategoryDao;
import cn.shutdown.dao.IUserDao;
import cn.shutdown.po.Category;
import cn.shutdown.po.User;
import cn.shutdown.service.ICategoryService;
import cn.shutdown.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("categoryService")
public class CategoryServiceImpl implements ICategoryService {
	
	@Autowired
	private ICategoryDao categoryDao;


	public List<Category> findAll() {
		return categoryDao.selectAll();
	}

	public Category findById(int id) {
		return categoryDao.selectByPrimaryKey(id);
	}

	public void save(Category category) {
		categoryDao.insert(category);
	}
}
